import request from '@/utils/request'

//条件查询带分页
export function getHospSetList(page,limit,searchObj) {
  return request({
    url: `/admin/hosp/hospitalSet/findHospitalSetList/${page}/${limit}`,
    method: 'post',
    data: searchObj
  })
}
//根据id删除
export function deleteHospById(id) {
    return request({
      url: `/admin/hosp/hospitalSet/removeById/${id}`,
      method: 'delete'
    })
}

//添加医院设置
export function addHospSet(hospitalSet) {
    return request({
      url: '/admin/hosp/hospitalSet/saveHospitalSet',
      method: 'post',
      data: hospitalSet
    })
}

//根据id查询医院设置
export function getHospSetById(id) {
    return request({
      url: '/admin/hosp/hospitalSet/getHospitalSetById/'+id,
      method: 'get'
    })
}
//修改医院设置
export function updateHospSet(hospitalSet) {
    return request({
      url: '/admin/hosp/hospitalSet/updateHospitalSet',
      method: 'put',
      data: hospitalSet
    })
}
//批量删除医院设置
export function batchDeleteHospSet(arr) {
    return request({
      url: '/admin/hosp/hospitalSet/batchRemoveHospitalSet',
      method: 'delete',
      data: arr
    })
}
//医院设置锁定和解锁
export function lockHospitalSet(id,status) {
  return request({
    url: `/admin/hosp/hospitalSet/lockHospitalSet/${id}/${status}`,
    method: 'put'
  })
}